angular.module('app').controller('madaoCtrl', 
['$scope', '$rootScope', 'http', 'stateV', '$state',
function($scope, $rootScope, http, stateV, $state) 
{	
	$rootScope.header = false;

	function ngInit(){
		
		http.get(globalConfig.web + "/home/source?source=madao", function(){});

		http.get(globalConfig.web + '/posts/shotList', function(data, status){
			if(status==200) $scope.hots = data;
		})

		http.get(globalConfig.web + '/posts/snewList', function(data, status){
			if(status==200) $scope.news = data;
		})
	}

	$scope.detail = function(data){
		// http.cacheUtil.setObject('detailmdPost', data);
		$state.go('detailmd', {pid:data.pid})
	}

	
	ngInit()
	
}]);